﻿@using ar.com.juanpabloibanez.Samples.ViewModels
@model SearchProducViewModel
@{
    ViewBag.Title = "PagerHelper for ASP.NET MVC3 Samples";
    Layout = "~/Views/Shared/_Layout.cshtml";
    string action = ViewBag.Action;
}
<h2>PagerHelper for ASP.NET MVC3 Samples</h2>
<p>
Source Code: <a href="http://pagerhelper.codeplex.com">http://pagerhelper.codeplex.com</a>
</p>
@Html.Partial("_SocialButtons")
<hr/>
<h3 >List of Products</h3>
@using (@Html.BeginForm(action, "Product", FormMethod.Post))
{
    <fieldset>
        <legend>Search Options</legend>
        @Html.LabelFor(m => m.Active)
        @Html.CheckBoxFor(m => m.Active)
        @Html.LabelFor(m => m.Name)
        @Html.TextBoxFor(m => m.Name)
        <button type="submit" name="PagerViewModel.CurrentPageByButton" title="Search">
            Search</button>
    </fieldset>
    if (ViewBag.EnhancePage != null && ViewBag.EnhancePage)
    {         
        <div id="grid" style="display: none">
            @Html.Partial("ProductsGrid", Model)
        </div>
    }
    else     
    {
        <div id="grid">
            @Html.Partial("ProductsGrid", Model)
        </div>
    }
}
<script type="text/javascript">
    function getResult() {
        return $("#grid");
    }
</script>
<br/>
<hr/>
<p>Please give me your comments in order to improve the way I code.</p>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:comments href="http://pagerhelper.apphb.com" num_posts="5" width="500"></fb:comments>